package com.ruoyi.jnpfjava.controller;


import com.ruoyi.jnpfjava.entity.AjaxResult;
import com.ruoyi.jnpfjava.entity.LoginDTO;
import com.ruoyi.jnpfjava.entity.LoginVo;
import com.ruoyi.jnpfjava.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

    @Autowired
    private LoginService loginService;

    @PostMapping("/login")
    public AjaxResult login(@RequestBody LoginVo loginVo) {
        return loginService.Login(loginVo.getUsername(), loginVo.getPassword());
    }
}
